﻿@Html.ActionLink("Create Task", "Create", "Task", null, new { @class = "btn danger" })

@{
    var items = new [] 
    {
        new {Text = "My Tasks", Action = "MyTasks", Controller = "Task"},
        new {Text = "All Tasks", Action = "Index", Controller = "Task"},
        new {Text = "Owned by me", Action = "OwnedByMe", Controller = "Task"},
        new {Text = "Completed", Action = "Completed", Controller = "Task"}
    };
}

<div class="menu">
    <ul>
    @foreach(var item in items)
    {
        if (item.Text == ViewBag.Title)
        {
             <li>@Html.ActionLink(item.Text, item.Action, item.Controller, new { tab = 0 }, new { @id = "menu-item-active" })</li>
        }
        else
        {
             <li>@Html.ActionLink(item.Text, item.Action, item.Controller, new { tab = 0 }, null)</li>
        }
    }
    </ul>
</div>
